1 package com.inigoserrano.isvalidator.okDo;
2
3 import com.inigoserrano.isvalidator.data.DataInternal;
4
5 /***
6 * This class is one implementation of the OkDo interface
7 *
8 * @license@
9 *
10 * @version @version@
11 * @author @author@
12 */
13 public class SimpleOkDo implements OkDo {
14 /***
15 * The Data to process
16 */
17 protected DataInternal contraint;
18
19 /***
20 * Constructor.
21 **/
22 public SimpleOkDo() {
23 super();
24 }
25
26 /***
27 * Exceutes this OkDo, in this case return a message with the
28 * ValueToCheckName and the ValueToCheck
29 * @return the message
30 * @throws OkDoInternalException for internal error only
31 **/
32 public String execute() throws OkDoInternalException {
33 return "The name of the data is: "
34 + contraint.getValueToCheckName()
35 + " and the value is: "
36 + contraint.getValueToCheck();
37 }
38 /***
39 * Set the Data to process
40 * @param constraintContainer the data
41 */
42 public void setData(DataInternal constraintContainer) {
43 this.contraint = constraintContainer;
44 }
45 }
This page was automatically generated by Maven